﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Eventhere.Work
{
    public class GroupContact
    {
        //CHAMP
        private int idGroup;

        private SortedSet<Contact> contactGroupContact;
        private String nameGroupContact;

        public int IdGroup
        {
            get { return idGroup; }
            set { idGroup = value; }
        }
        public String NameGroupContact
        {
            get { return nameGroupContact; }
            set { nameGroupContact = value; }
        }
        //CONSTRUCTEUR
        public GroupContact() {
            this.contactGroupContact = new SortedSet<Contact>();
            this.nameGroupContact = "";
        }

        public GroupContact(String name, SortedSet<Contact> contacts)
        {
            this.nameGroupContact = name;
            this.contactGroupContact = contacts;
        }

        public GroupContact(String name)
        {
            this.nameGroupContact = name;
            this.contactGroupContact = new SortedSet<Contact>();
        }

        //ACCESSEUR
        //contactGroupContact

        public SortedSet<Contact> ContactGroupContact
        {
            get { return contactGroupContact; }
            set { contactGroupContact = value; }
        }

        //METHODE
        public void addContact(Contact contact)
        {
            contactGroupContact.Add(contact);
        }
        public void suppContact(Contact contact)
        {
            //VERIFIER CE QUE SA RENVOI SI LE CONTACT NON PRESENT
            
            contactGroupContact.Remove(contact);
        }


    }
}
